import {createRouter, createWebHistory} from "vue-router"

export default createRouter({
    history: createWebHistory(),
    routes: [
        {
            path: '/hospital',
            component: () => import('@/pages/hospital/index.vue'),
            children:[
                {
                    path:'/hospital/details',
                    component:()=>import('@/pages/hospital/details/index.vue')
                },
                {
                    path:'/hospital/notice',
                    component:()=>import('@/pages/hospital/notice/index.vue')
                },
                {
                    path:'/hospital/register',
                    component:()=>import('@/pages/hospital/register/index.vue')
                },
                {
                    path:'/hospital/search',
                    component:()=>import('@/pages/hospital/search/index.vue')
                },
                {
                    path:'/hospital/stopInfo',
                    component:()=>import('@/pages/hospital/stopInfo/index.vue')
                }
            ]
        },
        {
            path: '/home',
            component: () => import('@/pages/home/index.vue')
        },
        {
            path: '/',
            redirect:'/home'
        }
    ]
})

